package com.stlm2.dems.dao;

import com.stlm2.core.common.page.PageView;
import com.stlm2.dems.entity.User;
import com.stlm2.core.base.BaseDao;

import java.util.List;

public interface UserDao extends BaseDao<User> {
    public User getByName(String name);
    public List<User> getByEmail(String email);
    public  User getByToken(String token);
    public void userTokenCheck(String token ,Integer userId);
    public void updateUserToken(User user,String token);

    public List<User> getByUserName(String name);
    public User getAgentUser(Integer id);
    public List<User> getByRoleId(int roleId);
    public List<User> getByUpper();

    public Integer userUpperLevel(Integer userId);

    public Integer countUserByLevel(Integer userId,Integer userLevelValue);

    public User getByLowerUserId(Integer id);

    public List<User> getUserLevel();

    public User getByWxOpenID(String wxOpenId);

    public User getByQqOpenID(String qqOpenId);

    public List<User> getByShopId(int shopId);

    PageView getInitRoleUser(int pageNo, int pageSize,int roleInit);

}